<include file="public:header" />
<form id="myform" name="myform" action="{:u('setting/edit')}" enctype="multipart/form-data" method="post">
  <div class="pad-10">
    <div class="col-tab">
      <ul class="tabBut cu-li">
        <li id="tab_setting_1" class="on" onclick="SwapTab('setting','on','',3,1);">网站信息</li>       
		<li id="tab_setting_3" onclick="SwapTab('setting','on','',3,3);">邮件设置</li>
		<li id="tab_setting_2" onclick="SwapTab('setting','on','',3,2);">网站状态</li>
      </ul>      
      <div id="div_setting_1" class="contentList pad-10">
          <table width="100%" cellpadding="2" cellspacing="1" class="table_form">
            <tr>
              <th width="120">{:L('site_name')} :</th>
              <td><input type="text" name="site[site_name]" size="80" value="{$set.site_name}"></td>
            </tr>
            <tr>
              <th width="120">{:L('site_domain')} :</th>
              <td><input type="text" name="site[site_domain]" size="80" value="{$set.site_domain}"></td>
            </tr>    
			<tr>
              <th>{:L('site_title')}:</th>
              <td><input type="text" name="site[site_title]" size="80" value="{$set.site_title}"></td>
            </tr>
            <tr>
              <th>{:L('site_keyword')} :</th>
              <td><input type="text" name="site[site_keyword]" size="80" value="{$set.site_keyword}"></td>
            </tr>
            <tr>
              <th>{:L('site_description')} :</th>
              <td><textarea rows="3" cols="80" name="site[site_description]">{$set.site_description}</textarea></td>
            </tr> 
			<tr>
              <th>{:L('site_logo')} :</th>
              <td>              	
				<input type="file" name="img" id="img" class="input-text" size=21 />
				<if condition="$set['site_logo'] neq ''">
					<img src="{$set['site_logo']}" style="max-height:64px;" />
				</if>
			  </td>
            </tr> 
            <tr>
              <th>{:L('default_kw')} :</th>
              <td><input type="text" name="site[default_kw]" id="site_icp" class="input-text" size="80" value="{$set.default_kw}">
                  <br/>可根据需求定义多个热门关键字，用","号分隔。
              </td>
            </tr>
            <tr>
              	<th>{:L('search_words')}:</th>
              	<td>
                    <textarea rows="3" cols="80" name="site[search_words]" id="search_words">{$set.search_words}</textarea>
            	</td>
        	</tr>
			<tr>
              <th width="100">瀑布流页面配置:</th>
              <td>
              	子页面个数  <input type="text" name="site[waterfall_sp]" value="{$set.waterfall_sp}"/>
                单次显示商品个数  <input type="text" name="site[waterfall_items_num]" value="{$set.waterfall_items_num}"/>
              </td>
            </tr> 
            <tr>
              <th width="120">瀑布流是否全屏 :</th>
              <td>
                <input type="radio" <if condition="$set.show_masonry eq '1'">checked="checked"</if> onclick="" value="1" name="site[show_masonry]" /> 开启 &nbsp;&nbsp;
                <input type="radio" <if condition="$set.show_masonry eq '0'">checked="checked"</if> onclick="" value="0" name="site[show_masonry]" /> 关闭 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
				
              </td>
            </tr>
            <tr>
              <th width="120">商品图片伪本地化 :</th>
              <td>
                <input type="radio" <if condition="$set.goods_save_images eq '1'">checked="checked"</if> onclick="" value="1" name="site[goods_save_images]" /> 开启 &nbsp;&nbsp;
                <input type="radio" <if condition="$set.goods_save_images eq '0'">checked="checked"</if> onclick="" value="0" name="site[goods_save_images]" /> 关闭 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
				<span>伪本地化有利于搜索引擎收录，但是对服务器性能有一定影响,需要伪静态支持，把规则复制到伪静态规则里				
				apache规则：RewriteRule ^upload/(.*)   index.php?m=public&a=photo&url=$1</span>
              </td>
            </tr>
            <tr>
              <th width="120">Ucenter同步登陆 :</th>
              <td>
                <input type="radio" <if condition="$set.ucenterlogin eq '1'">checked="checked"</if> onclick="" value="1" name="site[ucenterlogin]" /> 开启 &nbsp;&nbsp;
                <input type="radio" <if condition="$set.ucenterlogin eq '0'">checked="checked"</if> onclick="" value="0" name="site[ucenterlogin]" /> 关闭 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
				<span>开启Ucenter同步登陆后，请在Ucenter设置中填写正确信息，否则无法同步登陆</span>
              </td>
            </tr>
			<tr>
              <th width="120">{:L('check_code')} :</th>
              <td>
                <input type="radio" <if condition="$set.check_code eq '1'">checked="checked"</if> onclick="" value="1" name="site[check_code]" /> 开启 &nbsp;&nbsp;
                <input type="radio" <if condition="$set.check_code eq '0'">checked="checked"</if> onclick="" value="0" name="site[check_code]" /> 关闭 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;				
              </td>
            </tr>
			
            <tr>
              <th width="120">商品是否自动采集 :</th>
              <td>
                <input type="radio" <if condition="$set.goods_collect eq '1'">checked="checked"</if> onclick="" value="1" name="site[goods_collect]" /> 开启 &nbsp;&nbsp;
                <input type="radio" <if condition="$set.goods_collect eq '0'">checked="checked"</if> onclick="" value="0" name="site[goods_collect]" /> 关闭 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
				<span>如果关闭,需要您在后台手动采集，开启后每天定时为您采集数据</span>
              </td>
            </tr>
            <tr>
              <th width="120">商品自动采集时间 :</th>
              <td>
                <select name="site[collect_time]">
                <php>for($i=0;$i<24;$i++){</php>
                    <option value="<php>echo $i</php>" <php>if($i==$set['collect_time']){</php> selected="selected" <php>}</php>><php>echo $i</php>点</option>
                <php>}</php>
                </select>
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                <span>提示：(需要开启fsockopen支持) 建议自动采集时间设置在访问量较少的时段，0点-23点</span>
              </td>
            </tr>
			
			<tr>
              <th width="120">商家是否自动同步 :</th>
              <td>
                <input type="radio" <if condition="$set.seller_list_collect eq '1'">checked="checked"</if> onclick="" value="1" name="site[seller_list_collect]" /> 开启 &nbsp;&nbsp;
                <input type="radio" <if condition="$set.seller_list_collect eq '0'">checked="checked"</if> onclick="" value="0" name="site[seller_list_collect]" /> 关闭 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
				<span>提示：(需要开启fsockopen支持) 如果关闭,需要您在后台手动同步</span>
              </td>
            </tr>
            <tr>
              <th width="120">商家同步间隔时间 :</th>
              <td>
                <select name="site[seller_list_collect_time]">
                <php>for($i=1;$i<31;$i++){</php>
                    <option value="<php>echo $i</php>" <php>if($i==$set['seller_list_collect_time']){</php> selected="selected" <php>}</php>><php>echo $i</php>天</option>
                <php>}</php>
                </select>
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                <span>建议(7天)更新一次商家</span>
              </td>
            </tr>
			<tr>
              <th width="120">是否显示B2C广告 :</th>
              <td>
                <input type="radio" <if condition="$set.display_b2c_ad eq '1'">checked="checked"</if> onclick="" value="1" name="site[display_b2c_ad]" /> 开启 &nbsp;&nbsp;
                <input type="radio" <if condition="$set.display_b2c_ad eq '0'">checked="checked"</if> onclick="" value="0" name="site[display_b2c_ad]" /> 关闭 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
				
              </td>
            </tr>
            <tr>
              <th width="120">文章显示条数 :</th>
              <td>
                <input type="text" name="site[article_count]" value="{$set.article_count}"/>
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                
              </td>
            </tr>
            <tr>
              <th>评论时间 :</th>
              <td><input type="text" name="site[comment_time]" id="comment_time" class="input-text" value="{$set.comment_time}"><span>0表示不限制,单位/秒</span></td>
            </tr>
			
			<tr>
              <th>{:L('lately_like_max')} :</th>
              <td><input type="text" name="site[lately_like_max]" id="lately_like_max" class="input-text" value="{$set.lately_like_max}"><span>(例如：10，表示10分钟）用于首页刚刚喜欢，当用户喜欢的时间大于10分钟将随机显示下面文本框所设置的时间</span></td>
            </tr>
			
			<tr>
              <th>{:L('lately_like_rand')} :</th>
              <td><input type="text" name="site[lately_like_rand]" id="lately_like_rand" class="input-text" value="{$set.lately_like_rand}"><span>(例如：1,10，当最近喜欢的时间大于上面所设置的10分钟的时候，将随机显示1-10分钟的时间）</span></td>
            </tr>
			
            <tr>
              <th>{:L('site_icp')} :</th>
              <td><input type="text" name="site[site_icp]" id="site_icp" class="input-text" value="{$set.site_icp}"></td>
            </tr>
            <tr>
              	<th>{:L('statistics_code')} :</th>
              	<td>
                    <textarea rows="3" cols="80" name="site[statistics_code]" id="statistics_code">{$set.statistics_code}</textarea>
            	</td>
        	</tr>
			<tr>
              	<th>{:L('site_share')} :</th>
              	<td>
                    <textarea rows="3" cols="80" name="site[site_share]" id="site_share">{$set.site_share}</textarea>
            	</td>
        	</tr>			
        </table>
      </div>
      
      <div id="div_setting_2" class="contentList pad-10 hidden">
      	<table width="100%" cellpadding="2" cellspacing="1" class="table_form">       
            <tr>
              <th width="120">{:L('site_status')} :</th>
              <td>
                <input type="radio" <if condition="$set.site_status eq '1'">checked="checked"</if> onclick="" value="1" name="site[site_status]"> 开启 &nbsp;&nbsp;
                <input type="radio" <if condition="$set.site_status eq '0'">checked="checked"</if> onclick="" value="0" name="site[site_status]"> 关闭 &nbsp;&nbsp;
              </td>
            </tr>
            <tr>
              <th>{:L('closed_reason')} :</th>
              <td><textarea rows="4" cols="80" name="site[closed_reason]">{$set.closed_reason}</textarea></td>
            </tr>
         </table>      
      </div>
	   <div id="div_setting_3" class="contentList pad-10 hidden">
      	<table width="100%" cellpadding="2" cellspacing="1" class="table_form">       
            <tr>
              <th width="120">{:L('mail_smtp')}：</th>
              <td>
                <input type="text" name="site[mail_smtp]" id="mail_smtp" class="input-text" size="40" value="{$set.mail_smtp}">                
              </td>
            </tr>
			<tr>
              <th width="120">{:L('mail_port')}：</th>
              <td>
                <input type="text" name="site[mail_port]" id="mail_port" class="input-text" size="40" value="{$set.mail_port}">                
              </td>
            </tr> 
			<tr>
              <th width="120">{:L('mail_fromname')}：</th>
              <td>
                <input type="text" name="site[mail_fromname]" id="mail_fromname" class="input-text" size="40" value="{$set.mail_fromname}">                
              </td>
            </tr>
			<tr>
              <th width="120">{:L('mail_username')}：</th>
              <td>
                <input type="text" name="site[mail_username]" id="mail_username" class="input-text" size="40" value="{$set.mail_username}">                
              </td>
            </tr>
			<tr>
              <th width="120">{:L('mail_password')}：</th>
              <td>
                <input type="password" name="site[mail_password]" id="mail_password" class="input-text" size="40" value="{$set.mail_password}">                
              </td>
            </tr>            
         </table>      
      </div>
        
      <div class="bk15"></div>

      <div class="btn"><input type="submit" value="{$Think.lang.submit}" onclick="return submitFrom();" name="dosubmit" class="button" id="dosubmit"></div>

    </div>

  </div>

</form>

<script type="text/javascript">
function SwapTab(name,cls_show,cls_hide,cnt,cur){
    for(i=1;i<=cnt;i++){
		if(i==cur){
			 $('#div_'+name+'_'+i).show();
			 $('#tab_'+name+'_'+i).attr('class',cls_show);
		}else{
			 $('#div_'+name+'_'+i).hide();
			 $('#tab_'+name+'_'+i).attr('class',cls_hide);
		}
	}
}

</script>

</body></html>